package com.lemon.system.controller.feign;

import com.lemon.common.core.web.controller.BaseController;
import com.lemon.common.core.web.domain.AjaxResult;
import com.lemon.system.service.IBiElementsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 包名称：com.lemon.system.controller
 * 类名称：BiElementsController
 * 类描述：要素信息Controller
 * 创建人：@author huangpeng
 * 创建时间：2023-03-12
 */
@RestController
@RequestMapping("api/system/elements")
public class BiElementsFeignController extends BaseController {

    @Autowired
    private IBiElementsService biElementsService;

    /**
     * 根据要素编码获取要素值
     * @Title: getElValueByElCodeAndFCode
     * @Description: 根据要素编码获取要素值
     * @param elementCode 要输编码
     * @param functionCode 功能代码
     * @return: AjaxResult
     * @throws:
     * @author: huangpeng
     * @Date: 2023/11/18 17:49
     */
    @GetMapping("getElValueByElCodeAndFCode")
    public AjaxResult getElValueByElCodeAndFCode(@RequestParam(value = "elementCode") String elementCode,
                                                   @RequestParam(value = "functionCode") String functionCode) {
        return AjaxResult.success("操作成功", biElementsService.getElValueByElCodeAndFCode(elementCode, functionCode));
    }
}
